Script: --on windowEvent wdID,wdName,objNo,objName,objValue¬Global gGradeList¬global gWindowPositions¬global gMustRegrade¬¬---------------------¬-- This is window #28¬---------------------¬¬if objValue="Open" then ¬ wsSet wdID,"GradeList","Text", gGradeList¬ wsSet wdID,"PctOfNM","KeyFilter", "OnlyDigits"¬ ¬ put false into gMustRegrade¬ ¬ -- Restore old window position¬ put OldWindowPosition(28) into windowRect¬ if windowRect = empty then centerWindow wdName¬ else wsSet wdID,"0","Rect",windowRect¬ ¬ get "Remove_Disabled:True" & return & "Abbreviation_Disabled:True" & return & "Grade_Disabled:True" & return & "PctOfNM_Disabled:True" & return¬ wsSet wdID,0,"Properties",it¬ ¬else if objValue="Close" then ¬ -- save the window position¬ put "28" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 28 of gWindowPositions¬ ¬end if¬¬--end windowEvent
ItemType: PUSH
Rect: 339,123,419,143
AutoSize: FALSE
Name: Save
Balloon: Click here to save your changes.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global gMustRegrade¬global gGradeList¬¬put wsGet(wdID,"GradeList","Text") into gGradeList¬¬if gMustRegrade then send AdjustGrading to cd btn "Adjust Grading" of cd 2¬else wsSend "Grading Setup","0","Close"¬--end mouseUp¬¬¬
ItemType: PUSH
Rect: 339,148,419,168
Name: Cancel
CancelItem: TRUE
AutoClose: TRUE
Balloon: Click here to exit without saving your changes.
ItemType: LIST
Rect: 10,60,328,190
TextFont: Geneva
TextSize: 12
Name: GradeList
Style: ListWithTabs...
StyleInfo: ........................>.........<
Logic: Drag
Text: Mint M 105¬Near Mint NM 100¬Very Fine VF 75¬Fine FN 50¬Very Good VG 35¬Good GD 20¬Fair FA 10¬Poor P 5
Balloon: This is the list of all condition gradings.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global gLastGradeAbbrev¬global gLastPctofNM¬¬put wsGet(wdID,"GradeList","Selection") into gradeLine¬put wsGet(wdID,"GradeList","Text") into gradeList¬put line gradeLine of gradeList into theLine¬if theLine <> empty then¬ set the itemDelimiter to tab¬ put item 1 of theLine into theGradeName¬ put item 2 of theLine into theGradeAbbreviation¬ put theGradeAbbreviation into gLastGradeAbbreviation¬ put item 3 of theLine into thePctOfNM¬ put thePctOfNM into gLastPctOfNM¬ ¬ put "Grade_Selection:0,100" & return into theSelection¬ ¬ get "Grade_Text:" & theGradeName & return & "Abbreviation_Text:" & theGradeAbbreviation & return & "PctOfNM_Text:" & thePctOfNM & return & "Remove_Disabled:False" & return & "Grade_Disabled:False" & return & "Abbreviation_Disabled:false" & return & "PctOfNM_Disabled:False" & return ¬else¬ put "Grade_Selection:0,0" into theSelection¬ get "Remove_Disabled:True" & return & "Grade_Text:" & return & "Abbreviation_Text:" & return & "PctOfNM_Text:" & return & "Grade_Disabled:True" & return & "Abbreviation_Disabled:True" & return & "PctOfNM_Disabled:True" & return¬ ¬end if¬wsSet wdID,"0", "Properties", it & theSelection¬--end mouseUp
ItemType: TEXT
Rect: 10,35,205,57
TextFont: Geneva
TextSize: 12
Disabled: TRUE
Name: Grade
LockText: FALSE
KeyFilter: bOnly20Chars
Balloon: Enter the (relatively) long description of the condition grade here. For example (“Near Mint” or “Fair”).
Script: --on closeField wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"Grade","Text") into theGrade¬put wsGet(wdID,"GradeList","Selection") into theGradeLine¬if theGrade <> empty then¬ put wsGet(wdID,"GradeList","Text") into theGradeList¬ set the itemDelimiter to tab¬ ¬ put line theGradeLine of theGradeList into theLine¬ put theGrade & tab & (item 2 to 3 of theLine) into line theGradeLine of theGradeList¬ wsSet wdID,"GradeList","Text", theGradeList¬end if¬wsSet wdID,"GradeList","Selection", theGradeLine¬--end closeField
ItemType: TEXT
Rect: 208,35,252,57
TextFont: Geneva
TextSize: 12
Disabled: TRUE
Name: Abbreviation
LockText: FALSE
KeyFilter: bOnly4Chars
Balloon: Enter the short, one or two character abbreviation for the conditiong grade here. (E.g., “NM” to stand for “Near Mint”) or “VF” to stand for “Very Fine”). ¬¬This is the abbreviation that will appear on price lists and price labels.
Script: --on closeField wdID,wdName,objNo,objName,objValue¬global gLastGradeAbbrev¬global gLastPctofNM¬global gMustRegrade¬¬put wsGet(wdID,"GradeList","Selection") into theGradeLine¬put wsGet(wdID,"Abbreviation","Text") into theGradeAbbrev¬¬put false into duplicateFound¬¬if theGradeAbbrev <> empty then¬ put wsGet(wdID,"GradeList","Text") into theGradeList¬ ¬ set the itemDelimiter to tab¬ ¬ -- Check for a duplicate¬ repeat with x = 1 to the number of lines of theGradeList¬ if x <> theGradeLine then¬ if item 2 of line X of theGradeList = theGradeAbbrev then¬ wsSet wdID,"Abbreviation","Text", ""¬ wsSet wdID,"Abbreviation","Grade", "0,100"¬ get windowScript("Stop Alert","Sorry, but there’s already another grade with the abbreviation “" & theGradeAbbrev & "”. Please choose another.","OK")¬ ¬ put true into duplicateFound¬ end if¬ end if¬ end repeat¬ ¬ if not duplicateFound then¬ put line theGradeLine of theGradeList into theLine¬ put (item 1 of theLine) & tab & theGradeAbbrev & tab & (item 3 of theLine) into line theGradeLine of theGradeList¬ wsSet wdID,"GradeList","Text", theGradeList¬ end if¬end if¬¬if not duplicateFound then ¬ wsSet wdID,"GradeList","Selection", theGradeLine¬ if theGradeAbbrev <> gLastGradeAbbrev and gLastGradeAbbrev <> empty then put true into gMustRegrade¬end if¬--end closeField¬¬
ItemType: TEXT
Rect: 255,35,308,57
TextFont: Geneva
TextSize: 12
Disabled: TRUE
Name: PctOfNM
LockText: FALSE
KeyFilter: OnlyDigits
Balloon: This is the percent price that a comic in this grade would fetch as opposed to a similar comic in “Near Mint” condition.¬¬For instance, a comic in “Fine” condition might rate as 75% of a near mint version.
Script: --on closeField wdID,wdName,objNo,objName,objValue¬global gLastGradeAbbrev¬global gLastPctofNM¬global gMustRegrade¬¬put wsGet(wdID,"PctOfNM","Text") into thePctOfNM¬put wsGet(wdID,"GradeList","Selection") into theGradeLine¬if thePctOfNM <> empty then¬ put wsGet(wdID,"GradeList","Text") into theGradeList¬ set the itemDelimiter to tab¬ ¬ put line theGradeLine of theGradeList into theLine¬ put ((item 1 to 2 of theLine) & tab & thePctOfNM) into line theGradeLine of theGradeList¬ wsSet wdID,"GradeList","Text", theGradeList¬end if¬wsSet wdID,"GradeList","Selection", theGradeLine¬if thePctOfNM <> gLastPctOfNM and gLastPctOfNM <> empty then put true into gMustRegrade¬--end closeField
ItemType: TEXT
Rect: 14,22,49,34
TextFont: Geneva
TextSize: 9
Name: GradeLabel
WhiteColor: -8739,-8739,-8739
TextStyle: Bold
Text: Grade
ItemType: TEXT
Rect: 208,22,251,34
TextFont: Geneva
TextSize: 9
Name: AbbrevLabel
WhiteColor: -8739,-8739,-8739
TextStyle: Bold
Text: Abbrev
ItemType: TEXT
Rect: 252,10,312,34
TextFont: Geneva
TextSize: 9
Name: PctLabel
WhiteColor: -8739,-8739,-8739
TextStyle: Bold
TextAlign: Center
Text: % of¬Near Mint
ItemType: PUSH
Rect: 339,60,419,80
Name: New
Balloon: Click here to add a new condition grading to the list.
Balloon: Click here to remove the selected grading condition from the list.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"GradeList","Selection") into theLine¬put wsGet(wdID,"GradeList","Text") into theList¬if the number of lines of theList = 1 then¬ get windowScript ("Stop Alert","There must be at least one grading type for ComicBase to work properly.")¬else¬ delete line theLine of theList¬ ¬ wsSet wdID,"GradeList","Text",theList¬ ¬ set the itemDelimiter to tab¬ put item 1 of line theLine of theList into theGrade¬ put item 2 of line theLine of theList into theAbbreviation¬ put item 3 of line theLine of theList into thePctOfNM¬ get "GradeList_Selection:" & theLine & return & "Grade_Text:" & theGrade & return & "Abbreviation_Text:" & theAbbreviation & return & "PctOfNM_Text:" & thePctOfNM & return¬ ¬ if line theLine of theList <> empty then¬ put "Remove_Disabled:False" & return & "PctOfNM_Selection:0,100" & return after it¬ else¬ put "Remove_Disabled_True" & return & "Grade_Selection:0,100" & return after it¬ end if¬ ¬ wsSet wdID,"0", "Properties", it¬end if¬--end mouseUp¬